package com.java1412;

import brave.sampler.Sampler;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author java1412
 * @since 2023-10-29 15:08:12
 */
@SpringBootApplication
public class ServiceMiyaApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceMiyaApplication.class, args);
    }

    // 注册restTemplate
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    // 注册采样器
    @Bean
    public Sampler defaultSampler() {
        return Sampler.ALWAYS_SAMPLE;
    }
}
